package com.youth.feign;

import com.youth.feign.hystrix.UserFallBack;
import com.youth.result.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author: wuxian
 * @date: 2020/1/7 11:04
 */
@FeignClient(name = "service-user", fallback = UserFallBack.class)
public interface UserFeign {

    @RequestMapping(value = "/user/getUserPressionByName", method = RequestMethod.GET)
    public ResultBean getUserPressionByName(@RequestParam("userName") String userName);

    @RequestMapping(value = "/user/getUserRolesByName", method = RequestMethod.GET)
    ResultBean getUserRolesByName(@RequestParam("userName") String userName);
}
